﻿namespace DbMetadata.Providers
{
    /// <summary>
    /// Represents foreign key meta data.
    /// </summary>
    public class ForeignKeyInfo
    {
        /// <summary>
        /// Gets or sets the name of the foreign key constraint.
        /// </summary>
        public string ConstraintName { get; set; }

        /// <summary>
        /// Gets or sets the name of the table that owns the foreign key constraint.
        /// </summary>
        public string ForeignTableName { get; set; }

        /// <summary>
        /// Gets or sets the schema of the table that owns the foreign key constraint.
        /// </summary>
        public string ForeignTableSchema { get; set; }

        /// <summary>
        /// Gets or sets the catalog of the table that owns the foreign key constraint.
        /// </summary>
        public string ForeignTableCatalog { get; set; }

        /// <summary>
        /// Gets or sets the name of the column that is part of of the foreign key constraint.
        /// </summary>
        public string ForeignColumnName { get; set; }

        /// <summary>
        /// Gets or sets the name of the table that the foreign key constraint refers to. 
        /// </summary>
        public string PrimaryTableName { get; set; }

        /// <summary>
        /// Gets or sets the schema of the table that the foreign key constraint refers to.
        /// </summary>
        public string PrimaryTableSchema { get; set; }

        /// <summary>
        /// Gets or sets the catalog of the table that the foreign key constraint refers to.
        /// </summary>
        public string PrimaryTableCatalog { get; set; }

        /// <summary>
        /// Gets or sets the name of the column the the foreign key column refers to.
        /// </summary>
        public string PrimaryColumnName { get; set; }

    }
}
